//
//  WYCPreCell.m
//  快付钱包
//
//  Created by 中企互联 on 2018/1/19.
//  Copyright © 2018年 中企互联. All rights reserved.
//

#import "WYCPreCell.h"

@implementation WYCPreCell

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    WYCPreCell * cell = [tableView dequeueReusableCellWithIdentifier:[WYCPreCell ID]];
    cell = [[WYCPreCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:[WYCPreCell ID]];
    
    return cell;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setMember];
        
    }
    return self;
}
//cell控件摆放
- (void)setMember{
    
    self.typeImg = [[UIImageView alloc] init];
    self.typeImg.frame = CGRectMake(40 * px, 20 * px, 100 * px, 100 * px);
//    self.typeImg.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.typeImg];
    
    self.planAmountLabel = [[UILabel alloc] init];
    self.planAmountLabel.frame = CGRectMake(CGRectGetMaxX(self.typeImg.frame) + 20 * px, self.typeImg.y, self.contentView.width / 2, self.typeImg.height / 2);
    self.planAmountLabel.font = [UIFont systemFontOfSize:MiddleFont];
    [self.contentView addSubview:self.planAmountLabel];
    
    self.timeLabel = [[UILabel alloc] init];
    self.timeLabel.frame = CGRectMake(self.planAmountLabel.x, CGRectGetMaxY(self.planAmountLabel.frame) + 20 * px, self.planAmountLabel.width, 40 * px);
    self.timeLabel.textColor = WYCRGBColor(186, 195, 193);
    self.timeLabel.font = [UIFont systemFontOfSize:SmallFont];
    [self.contentView addSubview:self.timeLabel];
    
    self.proceduresLabel = [[UILabel alloc] init];
    self.proceduresLabel.frame = CGRectMake(self.contentView.width - 340 * px, self.timeLabel.y, 300 * px, self.timeLabel.height);
//    self.proceduresLabel.backgroundColor = WYCRGBColor(186, 195, 193);
    self.proceduresLabel.textAlignment = NSTextAlignmentRight;
    self.proceduresLabel.textColor = WYCRGBColor(186, 195, 193);
    self.proceduresLabel.font = [UIFont systemFontOfSize:SmallFont];
     [self.contentView addSubview:self.proceduresLabel];
    
    
    
}
+(NSString *)ID{
    return @"cell";
}
@end
